Skip to content

fix(reports): a report keeps the ISSN it went live with, and its invoice names it - #1689

Merged
sickerine merged 3 commits into
devfrom
fix/publishing-rulings-after-wave-4
Dec 1, 2026
Merged

sickerine merged 3 commits into
devfrom
fix/publishing-rulings-after-wave-4

Conversation

@sickerine

Copy link
Copy Markdown
Collaborator

Two rulings from the owner after the fourth walk of workspace publishing (OS-37). One commit each.

A report keeps the ISSN it went live with

An ISSN a series gets later must not reach a report already published. Before this, every report read its series' current ISSN, so a later ISSN showed on the report's page, in saved copies and in the search feed at once, and went to Crossref and Zenodo with the next correction, retry or embargo ending.

  • reports.issn is written when the report goes live and read first by seriesOf. A report not yet live still reads the series' ISSN as it is.
  • An ISSN change no longer refreshes saved copies, since no live report changes with it.
  • The ISSN field's hint in Settings, Admin, Publishing says reports already published don't take a new one (13 languages).

Migration. Run once per deployment right after its Convex push, and before a series is given an ISSN:

npx convex run migrations/reportIssn:run '{"dryRun":true}'
npx convex run migrations/reportIssn:run '{"dryRun":false}'

It gives each report already live the ISSN its series has now, which is what its page shows today. Safe to run again.

The invoice for a report names it

Stripe's invoice gets a Report field at its head with the report's key, on every way of paying. A paid invoice refuses changes to its text (tested on the sandbox), so the field has to be there when the invoice is made.

  • Stripe's checkout is told to add it to the invoice it makes (invoice_creation.invoice_data). Autumn passes it through, tested on the sandbox.
  • An invoice Autumn makes itself, for a saved card or the account's credit, takes the Stripe customer's default field. The activation sets it for that charge under the workspace's purchase lock and takes it off after. A second asking two minutes later takes it off if the action died. A clear only removes a field that still names the same report.
  • A failure to set or clear the field never stops a payment.

The sandbox Stripe product behind the checkout line is renamed from "Publishing on Openscholar Reports" to "Publishing", so a workspace with its own series isn't billed under ours. That is data, not code.

Checks

  • npx tsc --noEmit
  • npx vitest run convex/reports lib/reports convex/lib convex/migrations convex/workspaces convex/billing
  • npm run check:convex-rules, check:ui-rules, check:module-weight
  • Sandbox: a $1 saved-card charge through Autumn with the customer's field set produced a paid invoice carrying Report: R100725.

Out of scope

  • Itemised invoice lines (licence and each identifier). Autumn refuses custom lines on a one-off purchase.
  • Prod. Its Stripe product and its migration wait for promotion.

An ISSN a series gets later no longer reaches a report already published: its page, its saved copies, the search
feed and any later registration (a correction, an embargo ending) read the ISSN kept on the report when it went
live. migrations/reportIssn gives reports already live the one their series has now.
Stripe's invoice gets a Report field at its head on every way of paying. Stripe's checkout is told to add it to the
invoice it makes. An invoice Autumn makes itself, for a saved card or the account's credit, takes it from the
customer's default field, set for that charge under the purchase lock and taken off after, since a paid invoice
takes no text.
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6082c2e0-31e1-4891-9dad-3d1cf25003b6
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T16:08:44.285460Z aca13c8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…ce's report field holds the purchase lock and is asked again while it fails, and a request to Stripe is given up after 20 seconds
@sickerine
sickerine merged commit 4a74788 into dev Dec 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant